/**
 * WTF Engine
 *
 * License... etc.
 **
 * Win32 Graphics (Windowing) Implementation
 **
 * Authors: Sean Micklethwaite
 **/

#ifndef __graphics_win32H__
#define __graphics_win32H__

#include "config.h"

#ifdef __WM_WIN32__

#include <windows.h>
#include "vector.h"

namespace WtfGraphics {
	class Screen: public WtfEngine::Singleton<Screen>, IMPLEMENTS(Screen)
	{
		HWND mHWnd;
		WNDCLASSEX mWndClass;
		DWORD mWndExStyle;
		DWORD mWndStyle;
		HINSTANCE mInstance;

		iVector2D mvSize;

		public:
			Screen();
			virtual ~Screen() {};

			void SetMode(const GraphicsMode& mode);
			void UpdateScreen();

			void Activate();
			void Deactivate();

			int getWindowHandle() const {
				return (int)mHWnd;
			};

			iVector2D getSize() const {
				return mvSize;
			};


			static LRESULT CALLBACK WindowProc(HWND, UINT, WPARAM, LPARAM);

			GC_AUTOSIZE(Screen);
	};

	typedef Screen::tRef tScreenRef;
};

#endif
#endif
